gcc 4.6.0 has started to warn about set-but-unused variables.
So don't do that, then.
gint nclicks)
{
GdkEvent *event_copy;
- GList *link;
event_copy = gdk_event_copy (event);
event_copy->type = (nclicks == 2) ? GDK_2BUTTON_PRESS : GDK_3BUTTON_PRESS;
- link = _gdk_event_queue_append (display, event_copy);
+ _gdk_event_queue_append (display, event_copy);
}
void
static void
gdk_offscreen_window_destroy (GdkWindow *window,
- gboolean recursing,
- gboolean foreign_destroy)
+ gboolean recursing,
+ gboolean foreign_destroy)
{
- GdkOffscreenWindow *offscreen;
-
- offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
-
gdk_offscreen_window_set_embedder (window, NULL);
-
+
if (!recursing)
gdk_offscreen_window_hide (window);
}
static void
gdk_offscreen_window_move_resize_internal (GdkWindow *window,
- gint x,
- gint y,
- gint width,
- gint height,
- gboolean send_expose_events)
+ gint x,
+ gint y,
+ gint width,
+ gint height,
+ gboolean send_expose_events)
{
GdkOffscreenWindow *offscreen;
- gint dx, dy, dw, dh;
offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
if (window->destroyed)
return;
- dx = x - window->x;
- dy = y - window->y;
- dw = width - window->width;
- dh = height - window->height;
-
window->x = x;
window->y = y;
if (GDK_WINDOW_IS_MAPPED (window))
{
- // TODO: Only invalidate new area, i.e. for larger windows
+ /* TODO: Only invalidate new area, i.e. for larger windows */
gdk_window_invalidate_rect (window, NULL, TRUE);
_gdk_synthesize_crossing_events_for_geometry_change (window);
}
static void
gdk_offscreen_window_move_resize (GdkWindow *window,
- gboolean with_move,
- gint x,
- gint y,
- gint width,
- gint height)
+ gboolean with_move,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
- GdkOffscreenWindow *offscreen;
-
- offscreen = GDK_OFFSCREEN_WINDOW (window->impl);
-
if (!with_move)
{
x = window->x;
if (height < 0)
height = window->height;
- gdk_offscreen_window_move_resize_internal (window, x, y,
- width, height,
- TRUE);
+ gdk_offscreen_window_move_resize_internal (window,
+ x, y, width, height,
+ TRUE);
}
static void
static void
gdk_offscreen_window_hide (GdkWindow *window)
{
+ /* TODO: This needs updating to the new grab world */
+#if 0
GdkOffscreenWindow *offscreen;
GdkDisplay *display;
/* May need to break grabs on children */
display = gdk_window_get_display (window);
- /* TODO: This needs updating to the new grab world */
-#if 0
if (display->pointer_grab.window != NULL)
{
if (is_parent_of (window, display->pointer_grab.window))
* @data: user data for previously-added filter function
*
* Remove a filter previously added with gdk_window_add_filter().
- *
- **/
+ */
void
gdk_window_remove_filter (GdkWindow *window,
- GdkFilterFunc function,
- gpointer data)
+ GdkFilterFunc function,
+ gpointer data)
{
- GList *tmp_list, *node;
+ GList *tmp_list;
GdkEventFilter *filter;
g_return_if_fail (window == NULL || GDK_IS_WINDOW (window));
while (tmp_list)
{
filter = (GdkEventFilter *)tmp_list->data;
- node = tmp_list;
tmp_list = tmp_list->next;
if ((filter->function == function) && (filter->data == data))
- {
+ {
filter->flags |= GDK_EVENT_FILTER_REMOVED;
- _gdk_event_filter_unref (window, filter);
+ _gdk_event_filter_unref (window, filter);
- return;
- }
+ return;
+ }
}
}
static void
gdk_window_move_resize_toplevel (GdkWindow *window,
- gboolean with_move,
- gint x,
- gint y,
- gint width,
- gint height)
+ gboolean with_move,
+ gint x,
+ gint y,
+ gint width,
+ gint height)
{
cairo_region_t *old_region, *new_region;
GdkWindowImplClass *impl_class;
gboolean expose;
- int old_x, old_y, old_abs_x, old_abs_y;
- int dx, dy;
gboolean is_resize;
expose = FALSE;
old_region = NULL;
- old_x = window->x;
- old_y = window->y;
-
is_resize = (width != -1) || (height != -1);
if (gdk_window_is_viewable (window) &&
impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
impl_class->move_resize (window, with_move, x, y, width, height);
- dx = window->x - old_x;
- dy = window->y - old_y;
-
- old_abs_x = window->abs_x;
- old_abs_y = window->abs_y;
-
/* Avoid recomputing for pure toplevel moves, for performance reasons */
if (is_resize)
recompute_visible_regions (window, TRUE, FALSE);
new_region = cairo_region_copy (window->clip_region);
/* This is the newly exposed area (due to any resize),
- * X will expose it, but lets do that without the
- * roundtrip
+ * X will expose it, but lets do that without the roundtrip
*/
cairo_region_subtract (new_region, old_region);
gdk_window_invalidate_region_full (window, new_region, TRUE, CLEAR_BG_WINCLEARED);
void
_gdk_synthesize_crossing_events_for_geometry_change (GdkWindow *changed_window)
{
- GdkDisplay *display;
GdkWindow *toplevel;
if (_gdk_native_windows)
return; /* We use the native crossing events if all native */
- display = gdk_window_get_display (changed_window);
-
toplevel = get_event_toplevel (changed_window);
if (!toplevel->synthesize_crossing_event_queued)
if (!cursor)
return;
-
+
_gdk_x11_cursor_update_theme (cursor);
}
* gdk_x11_display_set_cursor_theme:
* @display: a #GdkDisplay
* @theme: the name of the cursor theme to use, or %NULL to unset
- * a previously set value
+ * a previously set value
* @size: the cursor size to use, or 0 to keep the previous size
*
* Sets the cursor theme from which the images for cursor
- * should be taken.
- *
- * If the windowing system supports it, existing cursors created
- * with gdk_cursor_new(), gdk_cursor_new_for_display() and
- * gdk_cursor_new_for_name() are updated to reflect the theme
+ * should be taken.
+ *
+ * If the windowing system supports it, existing cursors created
+ * with gdk_cursor_new(), gdk_cursor_new_for_display() and
+ * gdk_cursor_new_for_name() are updated to reflect the theme
* change. Custom cursors constructed with
* gdk_cursor_new_from_pixbuf() will have to be handled
- * by the application (GTK+ applications can learn about
+ * by the application (GTK+ applications can learn about
* cursor theme changes by listening for change notification
* for the corresponding #GtkSetting).
*
const gchar *theme,
const gint size)
{
- GdkX11Display *display_x11;
Display *xdisplay;
gchar *old_theme;
gint old_size;
g_return_if_fail (GDK_IS_DISPLAY (display));
- display_x11 = GDK_X11_DISPLAY (display);
xdisplay = GDK_DISPLAY_XDISPLAY (display);
old_theme = XcursorGetTheme (xdisplay);
XcursorSetTheme (xdisplay, theme);
if (size > 0)
XcursorSetDefaultSize (xdisplay, size);
-
+
g_slist_foreach (cursor_cache, update_cursor, NULL);
}
#else
-static GdkPixbuf*
+static GdkPixbuf*
gdk_x11_cursor_get_image (GdkCursor *cursor)
{
return NULL;
GdkEventMask event_mask)
{
XEventClass event_classes[MAX_DEVICE_CLASSES];
- GdkX11DeviceXI *device_xi;
gint num_classes;
event_mask |= (GDK_PROXIMITY_IN_MASK |
GDK_PROXIMITY_OUT_MASK);
- device_xi = GDK_X11_DEVICE_XI (device);
find_events (device, event_mask, event_classes, &num_classes);
XSelectExtensionEvent (GDK_WINDOW_XDISPLAY (window),
gdouble *x,
gdouble *y)
{
- GdkX11DeviceXI *device_xi;
GdkWindow *impl_window;
gdouble root_x, root_y;
gdouble temp_x, temp_y;
gint n_axes;
gint i;
- device_xi = GDK_X11_DEVICE_XI (device);
impl_window = _gdk_window_get_impl_window (window);
temp_x = temp_y = 0;
{
GdkX11DeviceManagerCore *device_manager;
GdkWindow *window;
- GdkWindowImplX11 *window_impl = NULL;
gboolean return_val;
GdkToplevelX11 *toplevel = NULL;
GdkX11Display *display_x11 = GDK_X11_DISPLAY (display);
return FALSE;
toplevel = _gdk_x11_window_get_toplevel (window);
- window_impl = GDK_WINDOW_IMPL_X11 (window->impl);
g_object_ref (window);
}
/* Initialize devices list */
for (i = 0; i < ndevices; i++)
{
- GdkDevice *device;
-
dev = &info[i];
- device = add_device (device_manager, dev, FALSE);
+ add_device (device_manager, dev, FALSE);
if (dev->use == XIMasterPointer ||
dev->use == XIMasterKeyboard)
{
GdkDisplay *display;
Display *xdisplay;
- GdkDevice *device;
XIDeviceInfo *info;
int ndevices;
gint i;
if (ev->info[i].flags & XIDeviceEnabled)
{
info = XIQueryDevice (xdisplay, ev->info[i].deviceid, &ndevices);
- device = add_device (device_manager, &info[0], TRUE);
+ add_device (device_manager, &info[0], TRUE);
XIFreeDeviceInfo (info);
}
else if (ev->info[i].flags & XIDeviceDisabled)
XIValuatorState *valuators)
{
guint n_axes, i;
- gint width, height;
gdouble *axes;
- double *vals;
+ gdouble *vals;
g_object_get (device, "n-axes", &n_axes, NULL);
axes = g_new0 (gdouble, n_axes);
vals = valuators->values;
- width = gdk_window_get_width (window);
- height = gdk_window_get_height (window);
-
for (i = 0; i < valuators->mask_len * 8; i++)
{
GdkAxisUse use;
GC xgc;
GdkRectangle extents;
GdkWindow *parent;
- int px, py;
/* We need to get data from subwindows here, because we might have
* shaped a native window over the moving region (with bg none,
* so we copy from the toplevel with INCLUDE_INFERIORS.
*/
parent = window;
- px = py = 0;
while (parent->parent != NULL &&
parent->parent->window_type != GDK_WINDOW_ROOT)
{